<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <!-- 引用模板 Header -->
    <div th:insert="bg/publicHead :: publicHead"></div>
    <!-- [ Header ] end -->
    <style type="text/css">
        .inputStyle{ padding:0px !important; }
        i{ cursor:pointer; }
        .red{ color:#FF3535; font-weight:700; }
        .blue{color:#0000ff; font-weight:700;}
        .img{width:50px; height:50px;}
        .use,.can,.pp{ font-size:30px; }
        .use{ color:red; }
        .can{ color:#00a100; }
    </style>
</head>


<body class="background-img-7">

<!-- [ navigation menu ] start -->
<!-- 引用模板 Header -->
<div th:insert="bg/templateLeft :: Menu(${pageName})"></div>
<!-- [ navigation menu ] end -->


<!-- [ Header ] start -->
<!-- 引用模板 Header -->
<div th:insert="bg/templateTop :: Header"></div>
<!-- [ Header ] end -->


<!-- [ Main Content ] start -->
<div class="pcoded-main-container"> <!--中间 Start -->

    <div class="pcoded-content">

        <!-- [ homePage ] start -->
        <!-- 引用模板 homePage -->
        <div th:insert="bg/homePage :: homePage"></div>
        <!-- [ homePage ] end -->


        <!-- [ Main Content ] start -->
        <!-- [ 内容区域 ] start -->
        <div class="row">
            <!-- 课程列表 -->

            <div class="col-xl-12 mainCotent">
                <h5><text th:text="${pageName}"></text></h5>
                <div><a href="checkcard">刷新</a></div>
                <!-- json源码 -->
                <!--<div th:text="${imageesData}"></div>-->

                <!-- Latest Order start -->
                <div style="margin:10px auto;" class="pp">已使用: <text class="use" th:text="${use}"></text>/<text class="can" th:text="${can}"></text></div>
                <!-- Latest Order end -->
            </div>
        </div> <!-- [ Main Content ] end -->

    </div>

</div> <!--中间 End -->


<!-- 引用模板 Bottom -->
<div th:insert="bg/publicBottom :: publicBottom"></div>
<!-- [ Bottom ] end -->



<script src="/bgTemplate/js/sweetalert.min.js"></script>
<script th:inline="javascript">
    var ServerIP= [[${ServerIP}]];
    $(document).ready(function() {
        $(".funBtn").click(async function(){
            var dataid=$(this).attr("id");
            var that=$(this);
            var cardAccount=$(this).parents(".trClass").find(".cardAccount");
            var cardPwd=$(this).parents(".trClass").find(".cardPwd");
            if(/\S/.test(cardAccount.val())===false){
                alert("请输入卡号");
                cardAccount.focus();
                return;
            }
            if(/\S/.test(cardPwd.val())===false){
                alert("请输入卡密");
                cardPwd.focus();
                return;
            }
            if (confirm("是否提交?")) {
                //alert(dataid+","+cardAccount+","+cardPwd);
                updateData={
                    id:dataid,
                    cardaccount:cardAccount.val(),
                    cardpwd:cardPwd.val()
                };
                if(updateData!=null){
                    var res=await SyncJson("/bg/api/updateOrders",updateData);
                    if(res.code===200){
                        alert("更新成功");
                    }
                }
            }
        });
    });
</script>

</body>



</html>